package mylib.archive.y2012.m09.IFMO_Train;

import mylib.dir.FastInputReader;

import java.io.PrintWriter;

public class TaskD {
    public void solve(int testNumber, FastInputReader in, PrintWriter out) {
        int k = in.nextInt();
        String s = in.nextString();
        for (int i = 2; i < k + 1; ++i) {
            StringBuilder stringBuilder = new StringBuilder();
            for (int j = 0; j < s.length(); ++j) {
                if ((j + 1) % i != 0) stringBuilder.append(s.charAt(j));
            }
            s = stringBuilder.toString();
        }
        out.print(s);
    }
}
